package com.fifth.common.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("g_goods")
@ApiModel(value = "Goods对象", description = "")
public class Goods {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("商品名称")
    private String gname;
    @ApiModelProperty("商品图片")
    private String img;
    @ApiModelProperty("商品描述")
    private String remark;
    @ApiModelProperty("商品品牌")
    private Integer brandid;
    @ApiModelProperty("商品类别")
    private Integer sortid;
    @ApiModelProperty("储存方式")
    private Integer depositid;
    @ApiModelProperty("商品单位")
    private Integer unitid;
    @ApiModelProperty("上架时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime addtime;
    @ApiModelProperty("保质期")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date expirationtime;
    @ApiModelProperty("商品审核状态")
    private Integer state;
    @ApiModelProperty("商品上下架状态")
    private Integer status;
    @ApiModelProperty("商家id")
    private String bid;
    @ApiModelProperty("单价")
    private Integer price;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String unitname;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private BigDecimal totalmoney;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Sort sort;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Brand brand;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Unit unit;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Deposit deposit;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private BusinessInfo businessInfo;

    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer isdeleted;

    @ApiModelProperty(value = "审核理由(备注)")
    private String checkContent;



    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String goodid;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer stocknum;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer totalnum;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer sellnum;
}
